home *** CD-ROM | disk | FTP | other *** search
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Newsgroups: comp.lang.c
- Subject: Re: help: gcc
- Date: 9 Mar 1996 18:51:58 GMT
- Organization: Ripco Communications, Inc.
- Message-ID: <4hsk0e$j8f@gail.ripco.com>
- NNTP-Posting-Host: foley.ripco.com
-
- spiffy@seas.gwu.edu (Marc Goldberg) in
- <4hpiht$1n2@cronkite.seas.gwu.edu> asks:
-
-
- >2FarmCheck.c: In function `readHostFiles':
- >2FarmCheck.c:23: dereferencing pointer to incomplete type
- [etc.]
-
- >The lines referred to are:
-
- >char *readHostFiles(char *name)
- > {
- > int foo;
- > struct FILE *fileDisc;
- ^^^^^^
- Lose this.
-
- >(23) *fileDisc = fopen("/users/spiffy/urls.txt", O_RDONLY);
- [etc.]
-
- Just so you know (from ISO 7.9.1):
- "The types declared as size_t (described in 7.1.6):
- FILE
- which is an object type capable of recording all the information
- needed to control a stream,..."
- Note that the type of the object to which fileDisc should point is
- `FILE', not `struct FILE'.
-
- stdio.h will typically have something like
- typedef struct /* some structure tag */ {
- /* the structure members */
- } FILE;
-
- ... and the subject line is wrong. This has nothing to do with gcc,
- except that gcc can be a C compiler.
-
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-